package com.moonlit.myspring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class FirstBean {
    public static void main(String[] args) throws Exception {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-idol.xml");
        //根据id获取到Performer接口
        ProjectJuggler former = (ProjectJuggler) applicationContext.getBean("poeticDuke");
        //调用接口中的方法
        former.perform();
    }
}